package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.service.IndexService;
import net.wanho.vo.ProductVo;
import net.wanho.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2024-10-25 10:53
 * Description：<描述>
 */
@RestController
@RequestMapping("/index")
@RequiredArgsConstructor
public class IndexController {

    private final IndexService indexService;

    @GetMapping("/inventWarning")
    public R inventWarning() {
        List<ProductVo> list = indexService.inventWarning();
        return R.success(list);
    }

}
